<template>
    <div>
        <nav-header v-if="show"></nav-header>
        <customer></customer>
        <nuxt />
    </div>
</template>
<script>
import navHeader from '@/components/header/header.vue'
import customer from '@/components/common/customer'
export default {
    components: {
        navHeader,
        customer
    },
    data() {
        return {
            show: true
        }
    },
    watch: {
        $route(to, from) {
            // this.show = !window.location.href.includes(to.path)
        }
    },
    created() {
        // 自动登录
        if (!process.server) {
            // console.log('route', this.$route)
            const ticket = this.$route.query.session_ticket

            if (ticket) {
                this.$setSessionTicket(ticket, true)
                // console.log('ticket', this.$getSessionTicket())
            }
        }
    },
    mounted() {
        this.show = !window.location.href.includes('/agreement')
    }
}
</script>
<style>
html {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    word-spacing: 1px;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
}

.button--green {
    display: inline-block;
    border-radius: 4px;
    border: 1px solid #3b8070;
    color: #3b8070;
    text-decoration: none;
    padding: 10px 30px;
}

.button--green:hover {
    color: #fff;
    background-color: #3b8070;
}

.button--grey {
    display: inline-block;
    border-radius: 4px;
    border: 1px solid #35495e;
    color: #35495e;
    text-decoration: none;
    padding: 10px 30px;
    margin-left: 15px;
}

.button--grey:hover {
    color: #fff;
    background-color: #35495e;
}
.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
</style>
